<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <meta charset="UTF-8" />
    <title>基础服务请求</title>
    <link rel="stylesheet" type="text/css" media="all" href="/layui/css/layui.css"/>
    <script type="text/javascript" src="/layui/layui.all.js"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/myJs.js"></script>
</head>
<body>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>基础服务请求</legend>
    </fieldset>
<div class="layui-row">
    <div class="layui-col-md4">
        <div class="layui-container">
        <!--6/12 布局-->
        <div class="layui-row">
            <div class="layui-col-xs4">
                <form id="auditform" class="layui-form layui-form-pane">
                    <div class="layui-form-item">
                        <label class="layui-form-label">URL</label>
                        <div class="layui-input-block">
                            <input type="text" name="url" autocomplete="off" placeholder="http://" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">Body</label>
                        <div class="layui-input-block">
                            <textarea placeholder="{json:String}" name="body" style="height: 300px" class="layui-textarea"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block ">
                            <button type="button" class="layui-btn layui-col-md-offset5" lay-filter="add" id="add" lay-submit="">点击请求</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
    </div>
    <div class="layui-col-md4">
        <div class="layui-col-md4">
            <div class="layui-container">
                <!--6/12 布局-->
                <div class="layui-row">
                    <div class="layui-col-xs4">
                        <form id="auditform2" class="layui-form layui-form-pane">
                            <div class="layui-form-item">
                                <label class="layui-form-label">URL</label>
                                <div class="layui-input-block">
                                    <input type="text" name="url" autocomplete="off" placeholder="http://" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">Body</label>
                                <div class="layui-input-block">
                                    <textarea placeholder="{json:String}" name="body" style="height: 300px" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block ">
                                    <button type="button" class="layui-btn layui-col-md-offset5" lay-filter="add2" id="add2" lay-submit="">点击请求</button>
                                </div>
                            </div>

                        </form>
                    </div>
                </div>
            </div>

        </div>

    </div>
    <div class="layui-col-md4">
        <div class="layui-col-md4">
            <div class="layui-container">
                <!--6/12 布局-->
                <div class="layui-row">
                    <div class="layui-col-xs4">
                        <form id="auditform3" class="layui-form layui-form-pane">
                            <div class="layui-form-item">
                                <label class="layui-form-label">URL</label>
                                <div class="layui-input-block">
                                    <input type="text" name="url" autocomplete="off" placeholder="http://" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">Body</label>
                                <div class="layui-input-block">
                                    <textarea placeholder="{json:String}" name="body" style="height: 300px" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block ">
                                    <button type="button" class="layui-btn layui-col-md-offset5" lay-filter="add3" id="add3" lay-submit="">点击请求</button>
                                </div>
                            </div>

                        </form>
                    </div>
                </div>
            </div>

        </div>

    </div>

</div>
<style>
    .fixed{ position:fixed; left:0px; bottom:0px; width:100%; height:50px; background: #bce8f1; z-index:9999;}
</style>
    <div class="fixed " align="center" style="font-family: 楷体"><br />三卡审核定制页面</div>
</body>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(add)', function(data){
            var from= $("#auditform");
            var model= serializeObject(from);
            $.ajax({
                type: "post",
                url: "/api/cases/commonhttp",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify(model),
                dataType: "json",
                success: function(data) {
                    var formattedStr = JSON.stringify(data, undefined, 4);
                    var formattedStrStr = highLight(formattedStr);
                        layui.use('layer', function () {
                            var layer = layui.layer;
                            layer.open({
                                type: 1,
                                area: ['800px', '600px'],
                                content: "<pre><br/>" + formattedStrStr + "<br/></pre>"
                            });
                        })
                    }
            })
        });
    });
</script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(add2)', function(data){
            var from= $("#auditform2");
            var model= serializeObject(from);
            $.ajax({
                type: "post",
                url: "/api/cases/commonhttp",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify(model),
                dataType: "json",
                success: function(data) {
                    var formattedStr = JSON.stringify(data, undefined, 4);
                    var formattedStrStr = highLight(formattedStr);
                    layui.use('layer', function () {
                        var layer = layui.layer;
                        layer.open({
                            type: 1,
                            area: ['800px', '600px'],
                            content: "<pre><br/>" + formattedStrStr + "<br/></pre>"
                        });
                    })
                }
            })
        });
    });
</script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(add3)', function(data){
            var from= $("#auditform3");
            var model= serializeObject(from);
            $.ajax({
                type: "post",
                url: "/api/cases/commonhttp",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify(model),
                dataType: "json",
                success: function(data) {
                    var formattedStr = JSON.stringify(data, undefined, 4);
                    var formattedStrStr = highLight(formattedStr);
                    layui.use('layer', function () {
                        var layer = layui.layer;
                        layer.open({
                            type: 1,
                            area: ['800px', '600px'],
                            content: "<pre><br/>" + formattedStrStr + "<br/></pre>"
                        });
                    })
                }
            })
        });
    });
</script>
</html>